//
//  MACookManageCell.m
//  meiang_edu
//
//  Created by 栋 on 2019/1/15.
//  Copyright © 2019年 com.meiang.meiang_edu. All rights reserved.
//

#import "MACookManageCell.h"
#import "CollectionHShowView.h"
#import "MACookCollectionCell.h"
@interface MACookManageCell()
@property (weak, nonatomic) IBOutlet UILabel *lblTitle;
@property (weak, nonatomic) IBOutlet UIView *viewCookListContent;
@property (strong, nonatomic) CollectionHShowView *cookListShow;

@end

@implementation MACookManageCell

- (void)awakeFromNib{
    [super awakeFromNib];
    
    CGFloat width = (SCREEN_WIDTH - 4*2-12*2-1.5*2)/3.0;
    CGFloat imageHeight = width * 142/225.0;
    CGSize itemSize = CGSizeMake(width, imageHeight+45.1);
    UICollectionViewFlowLayout * layout = [[UICollectionViewFlowLayout alloc] init];
    layout.itemSize = itemSize;
    layout.minimumLineSpacing = 4;
    layout.minimumInteritemSpacing = 0;
    layout.scrollDirection = UICollectionViewScrollDirectionVertical;
    
    CollectionHShowView * hView = [[CollectionHShowView alloc] initWithNibCell:@"MACookCollectionCell" modelName:@"MACookCollectionModel" cellSize:itemSize layout:layout];
    [_viewCookListContent addSubview:hView];
    [hView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.mas_equalTo(0);
        make.right.bottom.mas_equalTo(0);
    }];
    hView.collectionView.scrollEnabled = NO;
    _cookListShow = hView;
    
}


@end
